package cn.wolfcode.mapper;

import cn.wolfcode.domain.Student;
import org.apache.ibatis.annotations.Param;

public interface StudentMapper {

    /**
     * 保存操作
     */
    void save(Student student);

    /**
     * 往中间表插入数据
     */
    void insertRelation(@Param("studentId") Long studentId, @Param("teacherId")Long teacherId);

    /**
     * 根据id查询
     */
    Student get(Long id);

    /**
     * 删除
     */
    void delete(Long id);

    /**
     * 根据中间表的学生id删除
     */
    void  deleteRelation(Long studentId);
}
